package vehicle_snapshot_enum

// 车辆抓拍识别-摄像头状态
type cameraStatus int

var CameraStatus cameraStatus

// 正常
func (c *cameraStatus) Normal() int {
	return 1
}

// 离线
func (c *cameraStatus) Offline() int {
	return 2
}

// 异常
func (c *cameraStatus) Exceptional() int {
	return 3
}

func (c *cameraStatus) ToText(value int) string {
	switch value {

	case 1:
		return "正常"

	case 2:
		return "离线"

	case 3:
		return "异常"

	}
	return ""
}

func (c *cameraStatus) ToValue(text string) int {
	switch text {

	case "正常":
		return 1

	case "离线":
		return 2

	case "异常":
		return 3

	}
	return 0
}
